<tagLib name="fanwe" />
<include file="Public:header" />
<div class="handle-btns">
	<fanwe:linkBtn text="{%RETURN_LIST}" href="{:Cookie::get('returnUrl')}" />
</div>
<form method='post' id="form" name="form" action="{:U(MODULE_NAME.'/update')}" enctype="multipart/form-data">
<table cellpadding="4" cellspacing="0" border="0" class="table-form">
	<tr>
		<th width="150">{%NAME}</th>
		<td><input type="text" class="textinput requireinput" name="name" size="60" value="{$vo.name}" /></td>
	</tr>
	<tr>
		<th>{%VICE_NAME}</th>
		<td><input type="text" class="textinput" name="vice_name" size="60" value="{$vo.vice_name}" /></td>
	</tr>
	<tr>
		<th>{%DESC}</th>
		<td><input type="text" class="textinput" name="desc" size="60" value="{$vo.desc}" /></td>
	</tr>
	<tr>
		<th>{%IMG}</th>
		<td>
			<input type="file" class="fileinput" name="img" size="30" />
			<if condition="$vo['img'] neq ''">
				<a href="__ROOT__/{$vo.img}" target="_blank" >{%VIEW}</a>
			</if>
		</td>
	</tr>
	<tr>
		<th>{%TYPE}</th>
		<td>
			<select name="type" id='typeSelect'>
				<option value="1" <if condition="$vo['type'] eq 1">selected="selected"</if>>{%TYPE_1}</option>
				<option value="2" <if condition="$vo['type'] eq 2">selected="selected"</if>>{%TYPE_2}</option>
				<option value="3" <if condition="$vo['type'] eq 3">selected="selected"</if>>{%TYPE_3}</option>
				<!--<option value="4" <if condition="$vo['type'] eq 4">selected="selected"</if>>{%TYPE_4}</option>-->
				<option value="5" <if condition="$vo['type'] eq 5">selected="selected"</if>>{%TYPE_5}</option>
				<option value="6" <if condition="$vo['type'] eq 6">selected="selected"</if>>{%TYPE_6}</option>
				<!--<option value="7" <if condition="$vo['type'] eq 7">selected="selected"</if>>{%TYPE_7}</option>-->
				<option value="8" <if condition="$vo['type'] eq 8">selected="selected"</if>>{%TYPE_8}</option>
			</select>
		</td>
	</tr>
	<tr class="TYPE TYPE_1 <if condition="$vo['type'] neq 1">hidden</if>">
		<th>{%CID}</th>
		<td>
			<fanwe:select name='cid' first='{%ROOT_ID}' selected="vo['data']['cid']" textfield='name' valuefield='id' options='cate_list' />
		</td>
	</tr>
	<tr class="TYPE TYPE_1 <if condition="$vo['type'] neq 1">hidden</if>">
		<th>{%TAGS}</th>
		<td>
			<textarea name="tags" class="textinput areainput" rows="3">{$vo.data.tags}</textarea>
		</td>
	</tr>
	<tr class="TYPE TYPE_1 <if condition="$vo['type'] neq 1">hidden</if>">
		<th>&nbsp;</th>
		<td>
			<p>{%TAGS_TIPS}</p>
		</td>
	</tr>
	<tr class="TYPE TYPE_2 <if condition="$vo['type'] neq 2">hidden</if>">
		<th>{%URL}</th>
		<td>
			<input type="text" class="textinput" name="url" size="60" value="{$vo.data.url}" />
		</td>
	</tr>
	<tr class="TYPE TYPE_8 <if condition="$vo['type'] neq 8">hidden</if>">
		<th>{%SHARE_ID}</th>
		<td>
			<input type="text" class="textinput" name="share_id" size="10" value="{$vo.data.share_id}" />
		</td>
	</tr>
	<tr>
		<th>{%SORT}</th>
		<td>
			<input type="text" class="textinput" name="sort" value="{$vo.sort}" />
		</td>
	</tr>
	<tr class="act">
		<th>&nbsp;</th>
		<td>
			<input type="hidden" value="{$vo.id}" name="id" />
			<input type="submit" class="submit_btn" value="{%SUBMIT}" />
			<input type="reset" class="reset_btn" value="{%RESET}" />
		</td>
	</tr>
</table>
</form>
<script type="text/javascript">
jQuery(function($){
	$("#typeSelect").change(function(){
		$(".TYPE").hide();
		$(".TYPE_" + this.value).show();
	});
});
</script>
<include file="Public:footer" />